<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:jsf="http://xmlns.jcp.org/jsf"
                xmlns:f="http://xmlns.jcp.org/jsf/core"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                xmlns:p="http://primefaces.org/ui">

    <!-- TIENDA -->
    <div jsf:rendered="#{inputProductController.secondWizard eq 2}" >
        <div align="center">
            <h3>EMPRESA: #{inputProductController.shop.companyId.name}</h3>
        </div>
        <hr/>
        <div class="row">
            <div class="col-lg-4">
                <h5>* RUC: <strong>#{inputProductController.shop.companyId.ruc}</strong></h5>
                <h5>* TIENDA: <strong>#{inputProductController.shop.name}</strong></h5>
            </div>
            <div class="col-lg-4">
                <h5>* TELÉFONO: <strong>#{inputProductController.shop.phone}</strong></h5>
                <h5>* DIRECCIÓN: <strong>#{inputProductController.shop.address}</strong></h5>
            </div>
            <div class="col-lg-4">
                <h5>* CONTACTO: <strong>#{inputProductController.shop.contact}</strong></h5>
            </div>
        </div>
        <hr/>

        <!-- END TIENDA -->

        <div align="center">
            <h3>PRODUCTO: #{inputProductController.productShop.productId.name}</h3>
            <hr/>
            <h:form>
                <div class="row">
                    <div class="col-lg-4">
                        <h5>* CANTIDAD: </h5><strong><p:spinner value="#{inputProductController.productShop.amount}" min="0" /></strong>

                    </div>
                    <div class="col-lg-4">
                        <h5>* PRECIO </h5><strong><p:spinner stepFactor="0.10" value="#{inputProductController.productShop.outputPrice}" min="0" /></strong>

                    </div>
                    <div class="col-lg-4">
                        <h5>* TIPO DE MONEDA: 
                            <strong>
                                <p:selectOneMenu value="#{inputProductController.productShop.typeMoney}" required="true">
                                    <f:selectItem itemLabel="SOLES" itemValue="SOLES"/>
                                    <f:selectItem itemLabel="DOLARES" itemValue="DOLARES"/>
                                    <f:selectItem itemLabel="EUROS" itemValue="EUROS"/>
                                </p:selectOneMenu>
                            </strong>
                        </h5>
                    </div>
                </div>
                <hr/>

                <p:commandButton value="GUARDAR" update=":panelContent" 
                                 action="#{inputProductController.updateProductShop()}">
                    <f:setPropertyActionListener
                        target="#{navigationController.navigationContent}"
                        value="./pages/operation/register_product/forms/product_old_register.xhtml" />
                </p:commandButton>
            </h:form>
        </div>

    </div>

    <!-- INTERFAZ PARA ALMACÉN -->
    <div jsf:rendered="#{inputProductController.secondWizard eq 1}" >

        <div align="center">
            <h3>EMPRESA: #{inputProductController.storehouse.name}</h3>
        </div>
        <hr/>
        <div class="row" align="center">
            <div class="col-lg-6">
                <h5>* DIRECCIÓN: <strong>#{inputProductController.storehouse.address}</strong></h5>
            </div>
            <div class="col-lg-6">
                <h5>* TELÉFONO: <strong>#{inputProductController.storehouse.phone}</strong></h5>
            </div>
        </div>
        <hr/>
        <h:form>
            <div class="row">
                <div class="col-lg-12" align="center">
                    <h5>* CANTIDAD: </h5><strong><p:spinner value="#{inputProductController.storehouseProduct.amount}" min="0" /></strong>
                </div>
            </div>
            <hr/>

            <p:commandButton value="GUARDAR" update=":panelContent" 
                             action="#{inputProductController.updateProductStorehouse()}">
                <f:setPropertyActionListener
                    target="#{navigationController.navigationContent}"
                    value="./pages/operation/register_product/forms/product_old_register.xhtml" />
            </p:commandButton>
        </h:form>
    </div>

</ui:composition>
